package cn.edu.hznu.mybatis.sqlsession.impl;

import cn.edu.hznu.mybatis.config.Configuration;
import cn.edu.hznu.mybatis.sqlsession.SqlSession;
import cn.edu.hznu.mybatis.sqlsession.SqlSessionFactory;

/**
 * Created by wjj on 2020/5/25
 */
public class SqlSessionFactoryImpl implements SqlSessionFactory {
    private Configuration cfg;

    public SqlSessionFactoryImpl(Configuration cfg) {
        this.cfg = cfg;
    }

    public SqlSession openSession() {
        return new SqlSessionImpl(cfg);
    }
}
